import React, {useEffect, useState} from 'react';
import { Avatar, Input , Select, Button, Radio, DatePicker, Table } from 'antd';
import styles from "./index.module.scss";
import ConfigCardsCom from "@/pages/Config/components/ConfigCardsCom";
const PublishPage = () => {
  // 定义状态用于存储子组件的属性
  const [title, setTitle] = useState('标题1');
  // 发布布局到后端，并获取访问 URL
  const publishLayout = async () => {
  };

  const handleChange = (e: any) => {
    console.log(e.target.value);
    setTitle(e.target.value)
  };

  return (
    <div>
      <div className={styles.top1}>
        <div className={styles.search1}>
          {/*<Input addonBefore="编辑标题" onChange={handleChange} >{title}</Input>*/}
          <Input addonBefore="编辑标题" placeholder={"请输入标题"} value={title} style={{ width: '100%' }} autoComplete="off" onChange={handleChange} maxLength={30} />
        </div>
        <div className={styles.button1}>
          <Button type={'primary'} onClick={publishLayout}>发布</Button>
        </div>
      </div>
      <div
        id={'gridLayout'}
      >
      
        <ConfigCardsCom columns={3} total={5}/>
      
      </div>

    </div>
  );
};

export default PublishPage;
